package org.gd.hellospring.scheduling;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import javax.swing.*;

/**
 * @author Gorhover
 * @version 1.0-SNAPSHOT
 * @since 2013-10-29 13:36
 */
class App {

    public static void main(String[] args) throws InterruptedException {
        JFrame frame = new JFrame() {{
            ApplicationContext context = new AnnotationConfigApplicationContext(Config.class);
            Obj obj = context.getBean("obj", Obj.class);
            obj.print();
        }};
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.setVisible(true);
    }
}
